﻿package com.neriksworkshop.lib.colourLovers.requests 
{
	import com.neriksworkshop.lib.colourLovers.core.AbstractGraphicRequest;
	import com.neriksworkshop.lib.colourLovers.core.AbstractRequest;
	import com.neriksworkshop.lib.colourLovers.items.Palette;
	import com.neriksworkshop.lib.colourLovers.UIdURLLoader;
	import flash.events.Event;
	
	
	/**
	 * ...
	 * @author ...
	 */
	public class PaletteRequest extends AbstractGraphicRequest implements IRequest
	{
		
		
		public function PaletteRequest() 
		{
			super(this);
			_baseServiceUrl += "/palettes";

		}
		

		public function get hueOption():Array { return _params.hueOption; }
		
		public function set hueOption(value:Array):void 
		{
			_params.hueOption = value;
		}
		
		public function get hex():String  { return _params.hex; }
		
		public function set hex(value:String):void 
		{
			_params.hex = value;
		}
		
		public function get showPaletteWidths():Boolean  { return _params.showPaletteWidths; }
		
		public function set showPaletteWidths(value:Boolean):void 
		{
			_params.showPaletteWidths = value;
		}
		
		
		public function get palettes():/*Palette*/Array { return _items; }
		
		public function get palette():Palette
		{
			if (_items.length != 1) trace("warning: this request contains more than 1 palette, using the first item");
			return _items[0] as Palette;
		}
		
	}
	
}